/-app
/-docs
/-files ...
FileTree.ts
FileTree2.ts
SyncStorageAccess.ts
/-imports
/-persistence
/-storage
/-typings
errors.js
functions.ts
index.html
try.js
 
44
          
45
          if (this._contentPRE) {
46
            // double content?
47
          }
48
          else {
49
            this._contentPRE = <HTMLPreElement>child;
50
          }
51
          
52
        }
53
​
54
      }
55
      
56
      this.fullPath = parentPath + '/' + this.name;
57
      
58
​
59
      this._createChildNodesAndSort(childLIs);
60
​
61
    }
62
​
63
​
64
    private _createChildNodesAndSort(childLIs: HTMLLIElement[]) {
65
      
66
      for (var i = 0; i < childLIs.length; i++) {
67
        var node = new Node(this.fullPath, childLIs[i]);
68
        
69
        if (node.isDir) {
70
          this._insertChildNode(this._subDirs, node, <any>this._files.length);
71
        }
72
        else {
73
          this._insertChildNode(this._subDirs, node, false);
74
        }
75
      }
76
      
77
    }
78
​
79
    private _insertChildNode(nodeList: Node[], node: Node, forceRerootingEvenIfOrdered: boolean) {
80
      // TODO: binary search
81
    
82
      var appendLast = !nodeList.length || node.name > nodeList[nodeList.length - 1].name;
83
    }
84
    
85
  }
86
  
87
}
81:90